from django.conf.urls import url

from meiduo_mall.utils.response_code import RET
from . import views

urlpatterns = [
    # 生成图片验证码
    url(r'^image_codes/(?P<image_code_id>.+)/$', views.ImageCodeView.as_view()),
    # 输入图片验证码,点击发送短信,请求发送短信
    url(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.SmsCodeView.as_view()),


    url(r'^find_password/$', views.FPWView.as_view()),
    # 找回密码,第一步提交表单数据
    url(r'^accounts/(?P<username>\w+)/sms/token/$', views.StepOneView.as_view()),
    # 找回密码,第二步请求发送短信验证码
    url(r'^sms_codes/$', views.StepTwoSendCodeView.as_view()),

    url(r'^accounts/(?P<username>\w+)/password/token/$', views.StepTwoFormView.as_view()),
    # 找回密码,第三步更改密码
    url(r'^users/(?P<user_id>\d+)/password/$', views.StepThreeFormView.as_view()),
]
